﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CSharpAlgorithm
{
    class CandySplitting
    {
        public CandySplitting()
        {
            int testCount = Int32.Parse(TestConsole.ReadLine());

            for (int testCase = 1; testCase <= testCount; testCase++)
            {
                int candyCount = Int32.Parse(TestConsole.ReadLine());
                int[] candyList = new int[candyCount];
                string[] input = TestConsole.ReadLine().Split(' ');
                int minValue = Int32.MaxValue;
                for (int i = 0; i < candyCount; i++)
                {
                    candyList[i] = Int32.Parse(input[i]);
                    if (candyList[i] < minValue)
                    {
                        minValue = candyList[i];
                    }
                }
                int test = 0;
                foreach (int candy in candyList)
                {
                    test ^= candy;
                }
                if (test != 0)
                {
                    Console.WriteLine(string.Format("Case #{0}: {1}", testCase, "NO"));
                }
                else
                {
                    Console.WriteLine(string.Format("Case #{0}: {1}", testCase, candyList.Sum() - minValue));
                }
            }
        }
    }
}
